package com.xxxy;


import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/monitor")
public class SentinelController {

    @SentinelResource(value = "helloResource",blockHandler = "helloBlockHandler",
            blockHandlerClass = MoitorBlockHandler.class)
    @GetMapping("hello")
    public String hello(){
        return "hi";
    }



    }


